<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: D:/Projects/MiXiM/extsrc/mixim/src/modules/mac/Mac80211.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00434.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Mac80211.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode:c++ -*- ********************************************************</span>
<a name="l00002"></a>00002 <span class="comment"> * file:        Mac80211.h</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * author:      David Raguin/Marc L�bbers</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * copyright:   (C) 2004 Telecommunication Networks Group (TKN) at</span>
<a name="l00007"></a>00007 <span class="comment"> *              Technische Universitaet Berlin, Germany.</span>
<a name="l00008"></a>00008 <span class="comment"> *</span>
<a name="l00009"></a>00009 <span class="comment"> *              This program is free software; you can redistribute it</span>
<a name="l00010"></a>00010 <span class="comment"> *              and/or modify it under the terms of the GNU General Public</span>
<a name="l00011"></a>00011 <span class="comment"> *              License as published by the Free Software Foundation; either</span>
<a name="l00012"></a>00012 <span class="comment"> *              version 2 of the License, or (at your option) any later</span>
<a name="l00013"></a>00013 <span class="comment"> *              version.</span>
<a name="l00014"></a>00014 <span class="comment"> *              For further information see file COPYING</span>
<a name="l00015"></a>00015 <span class="comment"> *              in the top level directory</span>
<a name="l00016"></a>00016 <span class="comment"> ***************************************************************************</span>
<a name="l00017"></a>00017 <span class="comment"> * part of:     framework implementation developed by tkn</span>
<a name="l00018"></a>00018 <span class="comment"> **************************************************************************/</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef MAC_80211_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define MAC_80211_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;MiXiMDefs.h&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;BaseMacLayer.h&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;Consts80211.h&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;Mac80211Pkt_m.h&quot;</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="keyword">class </span>ChannelSenseRequest;
<a name="l00031"></a>00031 
<a name="l00041"></a><a class="code" href="a00128.html">00041</a> <span class="keyword">class </span>MIXIM_API <a class="code" href="a00128.html" title="An implementation of the 802.11b MAC.">Mac80211</a> : <span class="keyword">public</span> <a class="code" href="a00026.html" title="A very simple MAC module template which provides de- and encapsulation of messages using the standard...">BaseMacLayer</a>
<a name="l00042"></a>00042 {
<a name="l00043"></a>00043 <span class="keyword">private</span>:
<a name="l00046"></a>00046   <a class="code" href="a00128.html" title="An implementation of the 802.11b MAC.">Mac80211</a>(<span class="keyword">const</span> <a class="code" href="a00128.html" title="An implementation of the 802.11b MAC.">Mac80211</a>&amp;);
<a name="l00049"></a>00049   <a class="code" href="a00128.html" title="An implementation of the 802.11b MAC.">Mac80211</a>&amp; <a class="code" href="a00026.html#aac78343ae4c96940669323e51ec09ada" title="Assignment operator is not allowed.">operator=</a>(<span class="keyword">const</span> <a class="code" href="a00128.html" title="An implementation of the 802.11b MAC.">Mac80211</a>&amp;);
<a name="l00050"></a>00050 
<a name="l00051"></a>00051 <span class="keyword">public</span>:
<a name="l00052"></a>00052 
<a name="l00054"></a><a class="code" href="a00128.html#ae423db101e8431b0cbd67c347076c44a">00054</a>   <span class="keyword">enum</span> <a class="code" href="a00128.html#ae423db101e8431b0cbd67c347076c44a" title="frame kinds">Mac80211MessageKinds</a> {
<a name="l00055"></a>00055     <span class="comment">//between MAC layers of two nodes</span>
<a name="l00056"></a>00056     RTS = <a class="code" href="a00026.html#a8f1f4f485d6548964c1f1cbd75d1d9c7a0e31be8e59c319e75d7a9858ff984a2f">LAST_BASE_MAC_MESSAGE_KIND</a>, <span class="comment">// request to send</span>
<a name="l00057"></a>00057     CTS,                 <span class="comment">// clear to send</span>
<a name="l00058"></a>00058     ACK,                 <span class="comment">// acknowledgement</span>
<a name="l00059"></a>00059     DATA,
<a name="l00060"></a>00060     BROADCAST,
<a name="l00061"></a>00061     LAST_MAC_80211_MESSAGE_KIND
<a name="l00062"></a>00062   };
<a name="l00063"></a>00063 <span class="keyword">protected</span>:
<a name="l00065"></a><a class="code" href="a00128.html#a565ab82077f95d80ec44a4a4fed08ab9">00065</a>     <span class="keyword">typedef</span> std::list&lt;Mac80211Pkt*&gt; <a class="code" href="a00128.html#a565ab82077f95d80ec44a4a4fed08ab9" title="Type for a queue of Mac80211Pkts.">MacPktList</a>;
<a name="l00066"></a>00066 
<a name="l00068"></a><a class="code" href="a00128.html#a381307739876ed0d015352b95bd93186">00068</a>     <span class="keyword">enum</span> <a class="code" href="a00128.html#a381307739876ed0d015352b95bd93186">timerType</a> {
<a name="l00069"></a>00069       TIMEOUT,
<a name="l00070"></a>00070       NAV
<a name="l00071"></a>00071     };
<a name="l00072"></a>00072 
<a name="l00074"></a><a class="code" href="a00128.html#a7ff0b8b49d1a93feae6f808caf5fe447">00074</a>     <span class="keyword">enum</span> <a class="code" href="a00128.html#a7ff0b8b49d1a93feae6f808caf5fe447">State</a> {
<a name="l00075"></a>00075       WFDATA = 0, <span class="comment">// waiting for data packet</span>
<a name="l00076"></a>00076       QUIET = 1,  <span class="comment">// waiting for the communication between two other nodes to end</span>
<a name="l00077"></a>00077       IDLE = 2,   <span class="comment">// no packet to send, no packet receiving</span>
<a name="l00078"></a>00078       CONTEND = 3,<span class="comment">// contention state (battle for the channel)</span>
<a name="l00079"></a>00079       WFCTS = 4,  <span class="comment">// RTS sent, waiting for CTS</span>
<a name="l00080"></a>00080       WFACK = 5,  <span class="comment">// DATA packet sent, waiting for ACK</span>
<a name="l00081"></a>00081       BUSY = 6    <span class="comment">// during transmission of an ACK or a BROADCAST packet</span>
<a name="l00082"></a>00082     };
<a name="l00083"></a>00083 
<a name="l00085"></a><a class="code" href="a00154.html">00085</a>     <span class="keyword">struct </span><a class="code" href="a00154.html" title="Data about a neighbor host.">NeighborEntry</a> {
<a name="l00087"></a><a class="code" href="a00154.html#af7a33b9ab7e87d051c3ea834e0e3cd0b">00087</a>       <a class="code" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210" title="Type definition for a L2 (MAC) address.">LAddress::L2Type</a> <a class="code" href="a00154.html#af7a33b9ab7e87d051c3ea834e0e3cd0b" title="The neighbors address.">address</a>;
<a name="l00088"></a>00088         <span class="keywordtype">int</span>              fsc;
<a name="l00089"></a>00089         simtime_t        age;
<a name="l00090"></a>00090         <span class="keywordtype">double</span>           bitrate;
<a name="l00091"></a>00091 
<a name="l00092"></a>00092         <a class="code" href="a00154.html" title="Data about a neighbor host.">NeighborEntry</a>() : address(), fsc(0), age(), bitrate(0) {}
<a name="l00093"></a>00093     };
<a name="l00094"></a>00094 
<a name="l00096"></a><a class="code" href="a00128.html#a072f068412a3577d8d11ca98c52a9c48">00096</a>     <span class="keyword">typedef</span> std::list&lt;NeighborEntry&gt; <a class="code" href="a00128.html#a072f068412a3577d8d11ca98c52a9c48" title="Type for a list of NeighborEntries.">NeighborList</a>;
<a name="l00097"></a>00097 
<a name="l00098"></a>00098   <span class="keyword">public</span>:
<a name="l00099"></a>00099     <a class="code" href="a00128.html" title="An implementation of the 802.11b MAC.">Mac80211</a>();
<a name="l00100"></a>00100     <span class="keyword">virtual</span> ~<a class="code" href="a00128.html" title="An implementation of the 802.11b MAC.">Mac80211</a>();
<a name="l00101"></a>00101 
<a name="l00102"></a>00102     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00026.html#a61c82dc3b225eac37f7fa9936c28c2c3" title="Initialization of the module and some variables.">initialize</a>(<span class="keywordtype">int</span>);
<a name="l00103"></a>00103     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00025.html#a5ab11502dbeeea89693d29841376a2f7" title="Called when the simulation has finished.">finish</a>();
<a name="l00104"></a>00104 
<a name="l00105"></a>00105  <span class="keyword">protected</span>:
<a name="l00106"></a>00106 
<a name="l00108"></a>00108   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00026.html#add5277c1a60dab10db40c8d9641e48c4" title="Handle self messages such as timer...">handleSelfMsg</a>(cMessage*);
<a name="l00109"></a>00109 
<a name="l00111"></a>00111   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00026.html#a6de2ca07018de313a7147a03e6d77bff" title="Handle messages comming from the network layer.">handleUpperMsg</a>(cMessage* msg);
<a name="l00112"></a>00112 
<a name="l00114"></a>00114   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00026.html#a413375cec02b990a521b62086a02264c">handleLowerMsg</a>(cMessage*);
<a name="l00115"></a>00115 
<a name="l00117"></a>00117   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a00026.html#a796d456d593dfab3188b37e506dd76a8" title="Handle control messages from lower layer.">handleLowerControl</a>(cMessage*);
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 
<a name="l00121"></a>00121     <span class="keyword">virtual</span> <span class="keywordtype">void</span> handleEndContentionTimer();
<a name="l00122"></a>00122 
<a name="l00124"></a>00124     <span class="keywordtype">void</span> handleMsgNotForMe(cMessage *af, simtime_t_cref duration);
<a name="l00126"></a>00126     <span class="keywordtype">void</span> handleMsgForMe(Mac80211Pkt*);
<a name="l00127"></a>00127     <span class="comment">// ** @brief handle a Broadcast message*/</span>
<a name="l00128"></a>00128     <span class="keywordtype">void</span> handleBroadcastMsg(Mac80211Pkt*);
<a name="l00129"></a>00129 
<a name="l00131"></a>00131     <span class="keywordtype">void</span> handleEndTransmission();
<a name="l00132"></a>00132 
<a name="l00134"></a>00134     <span class="keywordtype">void</span> handleEndSifsTimer();
<a name="l00136"></a>00136     <span class="keywordtype">void</span> handleTimeoutTimer();
<a name="l00139"></a>00139     <span class="keywordtype">void</span> handleNavTimer();
<a name="l00140"></a>00140 
<a name="l00141"></a>00141     <span class="keywordtype">void</span> handleRTSframe(Mac80211Pkt*);
<a name="l00142"></a>00142 
<a name="l00143"></a>00143     <span class="keywordtype">void</span> handleDATAframe(Mac80211Pkt*);
<a name="l00144"></a>00144 
<a name="l00145"></a>00145     <span class="keywordtype">void</span> handleACKframe(Mac80211Pkt*);
<a name="l00146"></a>00146 
<a name="l00147"></a>00147     <span class="keywordtype">void</span> handleCTSframe(Mac80211Pkt*);
<a name="l00148"></a>00148 
<a name="l00149"></a>00149     <span class="keywordtype">void</span> dataTransmissionFailed();
<a name="l00150"></a>00150 
<a name="l00151"></a>00151     <span class="keywordtype">void</span> rtsTransmissionFailed();
<a name="l00152"></a>00152 
<a name="l00154"></a>00154     <span class="keyword">virtual</span> <span class="keywordtype">void</span> sendDATAframe(Mac80211Pkt*);
<a name="l00155"></a>00155 
<a name="l00157"></a>00157     <span class="keywordtype">void</span> sendACKframe(Mac80211Pkt*);
<a name="l00158"></a>00158 
<a name="l00160"></a>00160     <span class="keywordtype">void</span> sendCTSframe(Mac80211Pkt*);
<a name="l00161"></a>00161 
<a name="l00163"></a>00163     <span class="keyword">virtual</span> <span class="keywordtype">void</span> sendRTSframe();
<a name="l00164"></a>00164 
<a name="l00166"></a>00166     <span class="keywordtype">void</span> sendBROADCASTframe();
<a name="l00167"></a>00167 
<a name="l00169"></a>00169     <span class="keyword">virtual</span> macpkt_ptr_t <a class="code" href="a00026.html#a0e1c8dad62e40f43a43c7b8a0cb71501" title="Encapsulate the NetwPkt into an MacPkt.">encapsMsg</a>(cPacket *netw);
<a name="l00170"></a>00170 
<a name="l00172"></a>00172     <span class="keyword">virtual</span> cPacket* <a class="code" href="a00026.html#a998b4c4c56074a354b50f8c4fc5d6d4c" title="decapsulate the network message from the MacPkt">decapsMsg</a>(macpkt_ptr_t frame);
<a name="l00173"></a>00173 
<a name="l00175"></a>00175     <span class="keyword">virtual</span> <span class="keywordtype">void</span> beginNewCycle();
<a name="l00176"></a>00176 
<a name="l00178"></a>00178     simtime_t backoff(<span class="keywordtype">bool</span> rtscts = <span class="keyword">true</span>);
<a name="l00179"></a>00179 
<a name="l00181"></a>00181     <span class="keywordtype">void</span> testMaxAttempts();
<a name="l00182"></a>00182 
<a name="l00184"></a>00184     simtime_t timeOut(<a class="code" href="a00128.html#ae423db101e8431b0cbd67c347076c44a" title="frame kinds">Mac80211MessageKinds</a> type, <span class="keywordtype">double</span> br);
<a name="l00185"></a>00185 
<a name="l00187"></a>00187     simtime_t packetDuration(<span class="keywordtype">double</span> bits, <span class="keywordtype">double</span> br);
<a name="l00188"></a>00188 
<a name="l00190"></a>00190     <span class="keyword">const</span> <span class="keywordtype">char</span> *stateName(<a class="code" href="a00128.html#a7ff0b8b49d1a93feae6f808caf5fe447">State</a> state);
<a name="l00191"></a>00191 
<a name="l00193"></a>00193     <span class="keywordtype">void</span> setState(<a class="code" href="a00128.html#a7ff0b8b49d1a93feae6f808caf5fe447">State</a> state);
<a name="l00194"></a>00194 
<a name="l00196"></a><a class="code" href="a00128.html#aa316943080d714ffc3c0bf54ea8aeb08">00196</a>     <span class="keywordtype">bool</span> <a class="code" href="a00128.html#aa316943080d714ffc3c0bf54ea8aeb08" title="Check whether the next packet should be send with RTS/CTS.">rtsCts</a>(Mac80211Pkt* m) {
<a name="l00197"></a>00197         <span class="keywordflow">return</span> m-&gt;getBitLength() - MAC80211_HEADER_LENGTH &gt; rtsCtsThreshold;
<a name="l00198"></a>00198     }
<a name="l00199"></a>00199 
<a name="l00201"></a>00201     <span class="keywordtype">void</span> suspendContention();
<a name="l00202"></a>00202 
<a name="l00204"></a>00204     <span class="keywordtype">double</span> retrieveBitrate(<span class="keyword">const</span> <a class="code" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210" title="Type definition for a L2 (MAC) address.">LAddress::L2Type</a>&amp; destAddress);
<a name="l00205"></a>00205 
<a name="l00207"></a>00207     <span class="keywordtype">void</span> addNeighbor(Mac80211Pkt *af);
<a name="l00208"></a>00208 
<a name="l00210"></a><a class="code" href="a00128.html#aaf9d15b3d9055b2f56d4eddce7cc9850">00210</a>     NeighborList::iterator <a class="code" href="a00128.html#aaf9d15b3d9055b2f56d4eddce7cc9850" title="find a neighbor based on his address">findNeighbor</a>(<span class="keyword">const</span> <a class="code" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210" title="Type definition for a L2 (MAC) address.">LAddress::L2Type</a>&amp; address)  {
<a name="l00211"></a>00211         NeighborList::iterator it;
<a name="l00212"></a>00212         <span class="keywordflow">for</span>(it = neighbors.begin(); it != neighbors.end(); ++it) {
<a name="l00213"></a>00213             <span class="keywordflow">if</span>(it-&gt;address == address) <span class="keywordflow">break</span>;
<a name="l00214"></a>00214         }
<a name="l00215"></a>00215         <span class="keywordflow">return</span> it;
<a name="l00216"></a>00216     }
<a name="l00217"></a>00217 
<a name="l00219"></a><a class="code" href="a00128.html#a967bb2466f35274cc945db0d9e044eeb">00219</a>     NeighborList::iterator <a class="code" href="a00128.html#a967bb2466f35274cc945db0d9e044eeb" title="find the oldest neighbor -- usually in order to overwrite this entry">findOldestNeighbor</a>() {
<a name="l00220"></a>00220         NeighborList::iterator it = neighbors.begin();
<a name="l00221"></a>00221         NeighborList::iterator oldIt = neighbors.begin();
<a name="l00222"></a>00222         simtime_t age = it-&gt;age;
<a name="l00223"></a>00223         <span class="keywordflow">for</span>(; it != neighbors.end(); ++it) {
<a name="l00224"></a>00224             <span class="keywordflow">if</span>(it-&gt;age &lt; age) {
<a name="l00225"></a>00225                 age = it-&gt;age;
<a name="l00226"></a>00226                 oldIt = it;
<a name="l00227"></a>00227             }
<a name="l00228"></a>00228         }
<a name="l00229"></a>00229         <span class="keywordflow">return</span> oldIt;
<a name="l00230"></a>00230     }
<a name="l00231"></a>00231 
<a name="l00232"></a>00232 
<a name="l00239"></a>00239     <span class="keywordtype">void</span> senseChannelWhileIdle(simtime_t_cref duration);
<a name="l00240"></a>00240 
<a name="l00244"></a>00244     <a class="code" href="a00192.html" title="The signal class stores the physical representation of the signal of an AirFrame.">Signal</a>* <a class="code" href="a00026.html#a28ca155ff241c3e202a94724cc87b232" title="Creates a simple Signal defined over time with the passed parameters.">createSignal</a>(simtime_t_cref start, simtime_t_cref length, <span class="keywordtype">double</span> power, <span class="keywordtype">double</span> bitrate);
<a name="l00245"></a>00245 
<a name="l00246"></a>00246 <span class="keyword">protected</span>:
<a name="l00247"></a>00247 
<a name="l00248"></a>00248     <span class="comment">// TIMERS:</span>
<a name="l00249"></a>00249 
<a name="l00252"></a><a class="code" href="a00128.html#a2d31f97b0662b8e37f090c3b996cec82">00252</a>     cMessage* <a class="code" href="a00128.html#a2d31f97b0662b8e37f090c3b996cec82" title="Timer used for time-outs after the transmission of a RTS, a CTS, or a DATA packet.">timeout</a>;
<a name="l00253"></a>00253 
<a name="l00256"></a><a class="code" href="a00128.html#a35efb0198d0085a341aba515bec9146f">00256</a>     cMessage* <a class="code" href="a00128.html#a35efb0198d0085a341aba515bec9146f" title="Timer used for the defer time of a node. Also called NAV : networks allocation vector.">nav</a>;
<a name="l00257"></a>00257 
<a name="l00259"></a><a class="code" href="a00128.html#a7bd4f3adc205b150f9fa406fa582f0b6">00259</a>     ChannelSenseRequest* <a class="code" href="a00128.html#a7bd4f3adc205b150f9fa406fa582f0b6" title="Used to sense if the channel is idle for contention periods.">contention</a>;
<a name="l00260"></a>00260 
<a name="l00262"></a><a class="code" href="a00128.html#ace80836b6fcb1681f6b2d49466f87fb0">00262</a>     ChannelSenseRequest* <a class="code" href="a00128.html#ace80836b6fcb1681f6b2d49466f87fb0" title="Timer used to indicate the end of a SIFS.">endSifs</a>;
<a name="l00263"></a>00263 
<a name="l00267"></a><a class="code" href="a00128.html#a8104daf3041394b73fe545427cbc02d7">00267</a>     simtime_t <a class="code" href="a00128.html#a8104daf3041394b73fe545427cbc02d7" title="Stores the the time a channel sensing started. Used to calculate the quiet-time of the channel if the...">chSenseStart</a>;
<a name="l00268"></a>00268 
<a name="l00270"></a><a class="code" href="a00128.html#a56fa75f3eb056ae29b1a4b8da0035d8c">00270</a>     <a class="code" href="a00128.html#a7ff0b8b49d1a93feae6f808caf5fe447">State</a> <a class="code" href="a00128.html#a56fa75f3eb056ae29b1a4b8da0035d8c" title="Current state of the MAC.">state</a>;
<a name="l00271"></a>00271 
<a name="l00277"></a><a class="code" href="a00128.html#a226566e4a56cfed2928acc87ff3af90a">00277</a>     <span class="keywordtype">double</span> <a class="code" href="a00128.html#a226566e4a56cfed2928acc87ff3af90a" title="Default bitrate.">defaultBitrate</a>;
<a name="l00278"></a>00278 
<a name="l00280"></a><a class="code" href="a00128.html#a592eee2a24a6fcadd6fdf912a101719f">00280</a>     <span class="keywordtype">double</span> <a class="code" href="a00128.html#a592eee2a24a6fcadd6fdf912a101719f" title="The power at which data is transmitted.">txPower</a>;
<a name="l00281"></a>00281 
<a name="l00283"></a><a class="code" href="a00128.html#a67eba657efe23f5e5c21904f4744261d">00283</a>     <span class="keywordtype">double</span> <a class="code" href="a00128.html#a67eba657efe23f5e5c21904f4744261d" title="Stores the center frequency the Mac uses.">centerFreq</a>;
<a name="l00284"></a>00284 
<a name="l00286"></a><a class="code" href="a00128.html#a126c9db5a54bafa6ad74eb3ee24bd936">00286</a>     <span class="keywordtype">double</span> <a class="code" href="a00128.html#a126c9db5a54bafa6ad74eb3ee24bd936" title="Current bit rate at which data is transmitted.">bitrate</a>;
<a name="l00288"></a><a class="code" href="a00128.html#a979883a8da4b308de4a8e79b5bbbe2e6">00288</a>     <span class="keywordtype">bool</span> <a class="code" href="a00128.html#a979883a8da4b308de4a8e79b5bbbe2e6" title="Auto bit rate adaptation -- switch.">autoBitrate</a>;
<a name="l00290"></a><a class="code" href="a00128.html#a1cd38454a518f922ba57f68d22e2f31e">00290</a>     std::vector&lt;double&gt; <a class="code" href="a00128.html#a1cd38454a518f922ba57f68d22e2f31e" title="Hold RSSI thresholds at which to change the bitrates.">snrThresholds</a>;
<a name="l00291"></a>00291 
<a name="l00294"></a><a class="code" href="a00128.html#ae8892c105c3f0fb2b6f28634bb099f31">00294</a>     <span class="keywordtype">unsigned</span> <a class="code" href="a00128.html#ae8892c105c3f0fb2b6f28634bb099f31" title="Maximal number of packets in the queue; should be set in the omnetpp.ini.">queueLength</a>;
<a name="l00295"></a>00295 
<a name="l00297"></a><a class="code" href="a00128.html#a5d8e9b53c8d6cb0116feed506d843e18">00297</a>     <span class="keywordtype">bool</span> <a class="code" href="a00128.html#a5d8e9b53c8d6cb0116feed506d843e18" title="Boolean used to know if the next packet is a broadcast packet.">nextIsBroadcast</a>;
<a name="l00298"></a>00298 
<a name="l00300"></a><a class="code" href="a00128.html#a969e8e3a592dffccea28596c61b2af50">00300</a>     <a class="code" href="a00128.html#a565ab82077f95d80ec44a4a4fed08ab9" title="Type for a queue of Mac80211Pkts.">MacPktList</a> <a class="code" href="a00128.html#a969e8e3a592dffccea28596c61b2af50" title="Buffering of messages from upper layer.">fromUpperLayer</a>;
<a name="l00301"></a>00301 
<a name="l00307"></a><a class="code" href="a00128.html#a11fb608b3564e2d2cd41b463b1a8cc90">00307</a>     <span class="keywordtype">unsigned</span> <a class="code" href="a00128.html#a11fb608b3564e2d2cd41b463b1a8cc90" title="Number of frame transmission attempt.">longRetryCounter</a>;
<a name="l00308"></a>00308 
<a name="l00310"></a><a class="code" href="a00128.html#a9bbc3d71eddb62c4e12dcd500a58b0bb">00310</a>     <span class="keywordtype">unsigned</span> <a class="code" href="a00128.html#a9bbc3d71eddb62c4e12dcd500a58b0bb" title="Number of frame transmission attempt.">shortRetryCounter</a>;
<a name="l00311"></a>00311 
<a name="l00315"></a><a class="code" href="a00128.html#a58484d1a6f2031548d433d18438042e9">00315</a>     simtime_t <a class="code" href="a00128.html#a58484d1a6f2031548d433d18438042e9" title="remaining backoff time. If the backoff timer is interrupted, this variable holds the remaining backof...">remainingBackoff</a>;
<a name="l00316"></a>00316 
<a name="l00320"></a><a class="code" href="a00128.html#a4a9d1c8d45c46f18afa0f07f5b6572f4">00320</a>     simtime_t <a class="code" href="a00128.html#a4a9d1c8d45c46f18afa0f07f5b6572f4" title="current IFS value (DIFS or EIFS) If an error has been detected, the next backoff requires EIFS...">currentIFS</a>;
<a name="l00321"></a>00321 
<a name="l00323"></a><a class="code" href="a00128.html#a6ad4dd93415c98c969df05f53d739cfd">00323</a>     <span class="keywordtype">int</span> <a class="code" href="a00128.html#a6ad4dd93415c98c969df05f53d739cfd" title="Number of bits in a packet before RTS/CTS is used.">rtsCtsThreshold</a>;
<a name="l00324"></a>00324 
<a name="l00327"></a><a class="code" href="a00128.html#ab9f0ea820748af6d640569fc76f39659">00327</a>     simtime_t <a class="code" href="a00128.html#ab9f0ea820748af6d640569fc76f39659" title="Very small value used in timer scheduling in order to avoid multiple changements of state in the same...">delta</a>;
<a name="l00328"></a>00328 
<a name="l00330"></a><a class="code" href="a00128.html#ae62ff2c9617e5782f6f7231e36d1574d">00330</a>     <span class="keywordtype">unsigned</span> <a class="code" href="a00128.html#ae62ff2c9617e5782f6f7231e36d1574d" title="Keep information for this many neighbors.">neighborhoodCacheSize</a>;
<a name="l00332"></a><a class="code" href="a00128.html#aede2e9e4e32ef871e3a59c51564123de">00332</a>     simtime_t <a class="code" href="a00128.html#aede2e9e4e32ef871e3a59c51564123de" title="Consider information in cache outdate if it is older than this.">neighborhoodCacheMaxAge</a>;
<a name="l00333"></a>00333 
<a name="l00335"></a><a class="code" href="a00128.html#a4caf1f3c2c004851555c9c691b82edf9">00335</a>     <a class="code" href="a00128.html#a072f068412a3577d8d11ca98c52a9c48" title="Type for a list of NeighborEntries.">NeighborList</a> <a class="code" href="a00128.html#a4caf1f3c2c004851555c9c691b82edf9" title="A list of this hosts neighbors.">neighbors</a>;
<a name="l00336"></a>00336 
<a name="l00338"></a><a class="code" href="a00128.html#a9f9f566e85a76f63e63b5907bf9ad48a">00338</a>     <span class="keywordtype">bool</span> <a class="code" href="a00128.html#a9f9f566e85a76f63e63b5907bf9ad48a">switching</a>;
<a name="l00339"></a>00339 
<a name="l00341"></a><a class="code" href="a00128.html#a026837b7167d230bbe79a1e0630c7578">00341</a>     <span class="keywordtype">int</span> <a class="code" href="a00128.html#a026837b7167d230bbe79a1e0630c7578">fsc</a>;
<a name="l00342"></a>00342 };
<a name="l00343"></a>00343 
<a name="l00344"></a>00344 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>Mac80211.h</b>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:30 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
